package main

import (
	"fmt"
	"leetcode/35/solution"
)

// 35题
// 搜索插入位置
// https://leetcode-cn.com/problems/search-insert-position/

func main() {
	var (
		nums1   = []int{1, 3, 5, 6}
		target1 = 5
		nums2   = []int{1, 3, 5, 6}
		target2 = 2
		nums3   = []int{1, 3, 5, 6}
		target3 = 7
		nums4   = []int{1, 3, 5, 6}
		target4 = 0
		nums5   = []int{1, 3}
		target5 = 2
	)

	// 方案1
	fmt.Println(solution.V1(nums1, target1))
	fmt.Println(solution.V1(nums2, target2))
	fmt.Println(solution.V1(nums3, target3))
	fmt.Println(solution.V1(nums4, target4))
	fmt.Println(solution.V1(nums5, target5))

	// 方案2
	fmt.Println(solution.V2(nums1, target1))
	fmt.Println(solution.V2(nums2, target2))
	fmt.Println(solution.V2(nums3, target3))
	fmt.Println(solution.V2(nums4, target4))
	fmt.Println(solution.V2(nums5, target5))
}
